﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TestLinq.Entities;

namespace TestLinq.Data
{
    public class DangNhapProvider
    {
        public static bool Thepmoi(DangNhapInfo user)
        {
            using (var context = new TestDataContext())
            {
                context.DangNhap.InsertOnSubmit(user);
                context.SubmitChanges();
            }
            return false;
        }

        public static List<DangNhapInfo> GetAll()
        {
            using (var context = new TestDataContext())
            {
              return  context.DangNhap.ToList();
            }
        }
    }
}
